<html>
  <head>
    <title>覆盖页面模型</title>
  </head>
  <body>
    <script>
      /*
         1、覆盖页面模型（C#）

                                          using System.Threading.Tasks;
                                          using Microsoft.AspNetCore.Mvc;
                                          using Volo.Abp.DependencyInjection;
                                          using Volo.Abp.Identity;
                                          using Volo.Abp.Identity.Web.Pages.Identity.Users;

                                          namespace Acme.BookStore.Web.Pages.Identity.Users
                                          {
                                              [Dependency(ReplaceServices = true)]  // 替换实现
                                              [ExposeServices(typeof(EditModalModel))]  // 暴露服务
                                              public class MyEditModalModel : EditModalModel
                                              {
                                                  public MyEditModalModel(
                                                      IIdentityUserAppService identityUserAppService,
                                                      IIdentityRoleAppService identityRoleAppService
                                                      ) : base(
                                                          identityUserAppService,
                                                          identityRoleAppService)
                                                  {
                                                  }

                                                  public async override Task<IActionResult> OnPostAsync()
                                                  {
                                                      //TODO: Additional logic
                                                      await base.OnPostAsync();
                                                      //TODO: Additional logic
                                                  }
                                              }
                                          }

                                          此类继承并替换用户的EditModalModel，并覆盖OnPostAsync方法以在底层代码之前和之后执行附加逻辑。

                                          它使用ExposeServices和Dependency属性来替换类。

      */
    </script>
  </body>
</html>